#!/bin/bash

# AI-CRM 项目重启脚本

echo "================================"
echo "  AI-CRM 重启脚本"
echo "================================"
echo ""

echo "正在重启服务..."

if docker compose version &> /dev/null; then
    docker compose restart
else
    docker-compose restart
fi

if [ $? -eq 0 ]; then
    echo ""
    echo "服务已成功重启"
    echo ""
    echo "查看服务状态："
    if docker compose version &> /dev/null; then
        docker compose ps
    else
        docker-compose ps
    fi
else
    echo ""
    echo "错误: 服务重启失败"
    exit 1
fi

